﻿using Basefr.Attributes;
using Basefr.Core.Entities;
using System.ComponentModel.DataAnnotations.Schema;

namespace Paas.Core.Sys.Entities
{
    /// <summary>
    /// 角色用户
    /// </summary>
    [MainTable(nameof(RoleUser))]
    public class RoleUser : EntityBase, IPreDefined
    {
        public int RoleId { get; set; }
        [ForeignKey(nameof(RoleId))]
        public virtual Role Role { get; set; }

        public long UserId { get; set; }
        [ForeignKey(nameof(UserId))]
        public virtual User User { get; set; }


        public bool IsPreDefined { get; set; }
    }
}

